package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository //欺骗类                                      //让当前的Mapper接口继承BaseMapper
public interface CategoryMapper extends BaseMapper<Category> {
    //查询所有
    List<Category> findAll();

    //新增分类(菜品,套装公共后端)
    void save(Category category);


    //修改菜品及套餐
   // int updateById(Category category);
  //  void updateById(Category category);



    //根据分类id查询菜品数量
    Long countDishByCategoryId(Long id);

    //根据分类id查询套餐数量
    Long countSetmealByCategoryId(Long id);

    //根据id删除分类
    void deleteById(Long id);
}
